package com.googlecode.dgwt.client.dojox.data;

import java.util.Collection;
import java.util.Map;

import com.googlecode.dgwt.client.dojo.data.model.StoreModel;
import com.googlecode.dgwt.client.dojox.data.base.DataStoreBase;
import com.googlecode.dgwt.client.dojox.data.model.MapColumn;
import com.googlecode.dgwt.client.dojox.data.model.MapModel;

/**
 * @author wellsantos@wellsantos.com
 * @since 0.01
 */
public class MapStore extends DataStoreBase<Map<String,Object>,MapModel,MapColumn> {

    public MapStore() {
        super(new MapModel());
    }

    public MapStore(Collection<? extends Map<String,Object>> items) {
        super(new MapModel(), items);
    }

    public MapStore(int initialCapacity) {
        super(new MapModel(), initialCapacity);
    }

    protected MapStore(MapStore mirroredStore, MapModel newModel) {
        super(mirroredStore, newModel);
    }

    @Override
    public MapStore createMirror(StoreModel<Map<String, Object>, ?> model) {
        return new MapStore(this, (MapModel) model);
    }

    @Override
    public MapStore createMirror() {
        return createMirror(getModel());
    }

    @Override
    protected Class<?> getModelBaseClass() {
        return MapModel.class;
    }

}
